package com.atung.merchant.controller;


import com.atung.merchant.result.ApiResult;
import com.atung.merchant.service.StatisticsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Administrator
 */
@RequestMapping("/api/statistic")
@RestController
@Api(tags = "统计中心")
public class StatisticsController {

    @Resource
    private StatisticsService statisticsService;

    @PostMapping("/dailyData")
    @ApiOperation("/获取今日数据")
    public ApiResult statisticDailyData() {
        return ApiResult.ok(statisticsService.statisticDailyDataService());
    }

    @PostMapping("/revenue")
    @ApiOperation("/获取营收数据")
    public ApiResult statisticRevenue() {
        return ApiResult.ok(statisticsService.statisticRevenueService());
    }
}

